# Created by: Olivier Duchateau
# $FreeBSD$

PORTNAME=	birdie
PORTVERSION=	1.1
CATEGORIES=	net-im
MASTER_SITES=	GH GHC

MAINTAINER=	olivierd@FreeBSD.org
COMMENT=	Twitter client written in Vala

LICENSE=	GPLv3
LICENSE_FILE=	${WRKSRC}/COPYING

BUILD_DEPENDS=	valac:${PORTSDIR}/lang/vala
LIB_DEPENDS=	libpurple.so:${PORTSDIR}/net-im/libpurple \
	librest-0.7.so:${PORTSDIR}/devel/librest \
	libnotify.so:${PORTSDIR}/devel/libnotify \
	libjson-glib-1.0.so:${PORTSDIR}/devel/json-glib \
	libwebkitgtk-3.0.so:${PORTSDIR}/www/webkit-gtk3 \
	libcanberra.so:${PORTSDIR}/audio/libcanberra \
	libgee-0.8.so:${PORTSDIR}/devel/libgee \
	libgranite.so:${PORTSDIR}/x11-toolkits/granite \
	libdbusmenu-gtk3.so:${PORTSDIR}/devel/libdbusmenu

GH_ACCOUNT=	birdieapp
GH_PROJECT=	birdie
GH_TAGNAME=	${PORTVERSION}
GH_COMMIT=	d1db587

USE_GITHUB=	yes
USES=	cmake pkgconfig gettext desktop-file-utils
USE_GNOME=	glib20 gtk30 gtksourceview3
USE_XORG=	xtst
USE_SQLITE=	yes
INSTALLS_ICONS=	yes

GLIB_SCHEMAS=	org.birdieapp.birdie.gschema.xml

CMAKE_ARGS=	-DDEBUG:BOOL=OFF

post-patch:
	${REINPLACE_CMD} -e 's|gee-1.0|gee-0.8|g' ${WRKSRC}/CMakeLists.txt
	${FIND} ${WRKSRC} -type f \
		| ${XARGS} ${REINPLACE_CMD} -i "" 's|Linux|${OPSYS}|g'

.include <bsd.port.mk>
